-
Notifications
You must be signed in to change notification settings - Fork 101
feat: add parallel tool execution #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces parallel execution for tool calls in the RAG pipeline to improve performance when multiple tools are invoked simultaneously. The refactoring splits the tool execution logic into separate functions and leverages Python's ThreadPoolExecutor for concurrent processing.
Key changes:
- Refactored monolithic
_run_toolsfunction into_run_tool(single execution) and_run_tools(parallel orchestration) - Implemented parallel tool execution using
ThreadPoolExecutorwith configurable worker count - Added error handling with future cancellation to prevent resource leaks on failures
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Pull Request Overview
This pull request introduces parallel execution for tool calls in the RAG pipeline to improve performance when multiple tools are invoked simultaneously. The refactoring splits the tool execution logic into separate functions and leverages Python's
ThreadPoolExecutorfor concurrent processing.Key changes:
_run_toolsfunction into_run_tool(single execution) and_run_tools(parallel orchestration)ThreadPoolExecutorwith configurable worker count